define(['app'], function(app) {
	'use strict';

	//实例化方法
	var factory = function(Http) {

		//返回信息
		return {
			//"商品"收藏一览
			get_goods: function(param, callback, error, done) {
				param = param || {}
				param.method = 'member.favorite.goods';
				//post请求
				Http.post(param, callback, error, done);
			},

			//"店铺"收藏一览
			get_store: function(param, callback, error, done) {
				param = param || {}
				param.method = 'member.favorite.store';
				//post请求
				Http.post(param, callback, error, done);
			},

			//删除“商品”收藏
			delete_goods: function(param, callback, error, done) {
				param = param || {}
				param.method = 'member.favorite.dellgoods';
				//post请求
				Http.post(param, callback, error, done);
			},
			
			//删除“店铺”收藏
			delete_store: function(param, callback, error, done) {
				param = param || {}
				param.method = 'member.favorite.delstore';
				//post请求
				Http.post(param, callback, error, done);
			}
		};
	}

	factory.$inject = ['Http'];
	return app.registerService("Favorite", factory);
});